package JLB_Chapter_11;

public class code_11_03 {
    enum Constants {
        Constants_A, Constants_B, Constants_C, Constants_D
    }
    public static void compare(Constants c) {
        Constants[] array = Constants.values();
        for(int i = 0; i < array.length; i++) {
            System.out.println(c + "与" + array[i] + "的比较结果为：" + c.compareTo(array[i]));
        }
    }
    public static void main(String[] args) {
        compare(Constants.valueOf("Constants_B"));
    }
}
